import React, {Component} from 'react';
import {connect} from 'react-redux';

import './articlesOtherFood.scss';

class ArticlesOtherFood extends Component {

    render() {
        return (
            <div className='aOtherFoodCon'>
                {this.props.other && this.props.other.map((item, key) =>
                    <div className='articlesOtherFood' key={key}>
                        <div className='atorImg'>
                            <img src={item.aoImg} alt="pic"/>
                        </div>
                        <p>{item.aoTitle}</p>
                        <p>{item.aoPrice}</p>
                    </div>
                )}
            </div>
        )
    }

}

const mapStateToProps = (state) => {
    let other = state.proArticles.other;
    if (other) {
        //console.log(other);
        return {
            other
        }
    } else {
        return {}
    }
}
export default connect(mapStateToProps)(ArticlesOtherFood)